﻿@model IList<Shopping_cart.Models.Product>
@{
    ViewBag.Title = "Home Page";
}
<h2>
    Select Products</h2>
<h2>
    Discount Details:
</h2>
<div>
    For 2 Items : 5%</div>
<div>
    For 3-4 Items : 10%</div>
<div>
    For more than 4 Items : 15%</div>
<br/>
<form action="@Url.Action("PrintReceipt")" method="post">
<table>
    <tr>
        <td>
        </td>
        <td>
            Name
        </td>
        <td>
            Price(Rs.)
        </td>
        <td>
            Count
        </td>
    </tr>
    @{ int i = 0; }
        @foreach (var product in Model)
    {
        <tr>
            <td>
                <input type="checkbox" name="selected" value="@product.Id"/>
            </td>
            <td>
                @product.Name
            </td>
            <td>
                @product.Price
            </td>
            <td>
                <input type="hidden" name="Product[@i].Id" value="@product.Id" />
                <input type="text" name="Product[@i].Count" value="0"/>
            </td>
        </tr>
        i++;
    }
</table>
<input type="submit" value=" Go... " />
</form>
